<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@ page import="com.google.appengine.api.users.User"%>
<%@ page import="com.google.appengine.api.users.UserService"%>
<%@ page import="com.google.appengine.api.users.UserServiceFactory"%>
<%@ page import="org.teammach.laddercomp.dao.BlogManager"%>
<%@ page import="org.teammach.laddercomp.shared.BlogEntry"%>
<%@ page import="com.google.appengine.api.datastore.Entity"%>

<%@ page import="java.util.List"%>

<html>
<body>

<%
	BlogManager manager = BlogManager.INSTANCE;
%>


<p> Updating Blog entry... </p>


<% 
	if(request.getParameter("actionType").equalsIgnoreCase("edit")) {
	manager.updateBlog(request.getParameter("blogKey"), request.getParameter("title"),
			request.getParameter("content"));
	}else if (request.getParameter("actionType").equalsIgnoreCase("delete")) {
		manager.deleteBlog(request.getParameter("blogKey"));
	}
	response.sendRedirect("blog.jsp");		

   
%>



</body>
</html>